package com.xxq.gulimall.product.dao;

import com.xxq.common.utils.PageUtils;
import com.xxq.gulimall.product.entity.AttrEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxq.gulimall.product.entity.AttrGroupEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品属性
 * 
 * @author xxq
 * @email 1607903138@qq.com
 * @date 2022-04-28 20:20:14
 */
@Mapper
public interface AttrDao extends BaseMapper<AttrEntity> {
    List<AttrEntity> queryPageByCatelogIdBySql(@Param("page") Integer page,
                                               @Param("limit") Integer limit,
                                               @Param("sidx") String sidx,
                                               @Param("order") String order,
                                               @Param("catelogId") Long catelogId);
    Integer queryTotalCountByCatelogId(@Param("catelogId") Long catelogId);
    List<AttrEntity> getRelation(@Param("attrGroupId") Long attrGroupId);
    List<AttrEntity> getRelations(@Param("attrGroupIds") List<Long> attrGroupId);
}
